<?php
session_start();
include "../../../config/koneksi.php";
include "../../../config/fungsi_seo.php";

$module=$_GET['module'];
$act=$_GET['act'];

// Hapus Kategori
if ($module=='news_email' AND $act=='hapus'){
  mysql_query("DELETE FROM email WHERE name='$_GET[id]'");
  header('location:../../media.php?module='.$module);
}

// Input kategori
elseif ($module=='news_email' AND $act=='input'){
  mysql_query("INSERT INTO email(name) VALUES('$_POST[email]')");
  header('location:../../media.php?module='.$module);
}

// Update kategori
elseif ($module=='news_email' AND $act=='update'){
  mysql_query("UPDATE email SET name = '$_POST[name]' WHERE name = '$_POST[id]'");
  header('location:../../media.php?module='.$module);
}
?>
